package com.vegas.netspider.apps;

import java.util.Map;

import com.vegas.netspider.base.WebClient;
import com.vegas.netspider.base.WebClientManager;

public class WebLoader {

	private WebClientManager clientManager;	
	
	public void setClientManager(WebClientManager clientManager) {
		this.clientManager = clientManager;
	}

	public String load(String url) throws Exception{
		WebClient webSocket = clientManager.getWebClient();
		String content = webSocket.getWebSource(url);
		return content;
	}
	
	
	public String load(String url,Map<String,String> paramters) throws Exception{
		WebClient webSocket = clientManager.getWebClient();
		String content =  webSocket.getWebSource(url,paramters);
		return content;
	}
	
}
